package com.tl.spider.pojo;

import com.tl.spider.constant.TaskLevelEnum;

public class UrlTaskPojo {
	private String url;
	private TaskLevelEnum taskLevel = TaskLevelEnum.ROOT;

	public UrlTaskPojo(String url, TaskLevelEnum taskLevel) {
		super();
		this.url = url;
		this.taskLevel = taskLevel;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public TaskLevelEnum getTaskLevel() {
		return taskLevel;
	}

	public void setTaskLevel(TaskLevelEnum taskLevel) {
		this.taskLevel = taskLevel;
	}

	@Override
	public String toString() {
		return "UrlTaskPojo [url=" + url + ", taskLevel=" + taskLevel + "]";
	}

	@Override
	public int hashCode() {
		return this.url.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		UrlTaskPojo pojo = (UrlTaskPojo) obj;
		return this.url.equals(pojo.url);
	}

}
